package com.xjust.controller.registerDepartMent;

import com.xjust.pojo.Result;
import com.xjust.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;


@RestController
@RequestMapping("/employees")
public class EmployeeController {
    @Autowired
    EmployeeService employeeService;
    //获取看诊医生
    @GetMapping("/getEmployee")
    public Result getEmployee(Integer deptmentId,Integer registLevelId){
        List<Map<String, Object>> list = employeeService.getEmployee(deptmentId,registLevelId);
        return Result.success(list);
    }
    @GetMapping("/getDoctorBydepementId")
    public Result getDoctorBydepementId(Integer deptId){
        List<Map<String,Object>> map = employeeService.getDoctorBydepementId(deptId);
        return Result.success(map);
    }
}
